// pages/menu/menu.js
Page({
  data: {
    menuCate: [
      {
        cate_id: 1,
        cate_name: "护肤",
        ishaveChild: true,
       
        children: [{
            child_id: 1,
            url:"/pages/details/details",
            name: '第二代 [小黑瓶]',
          image: "https://res.lancome.com.cn/resources/2020/8/12/15972034407746688_258X258.jpg"
          },
          {
            child_id: 2,
            url:"/pages/details1/details1",
            name: '口碑粉水',
            image: "https://res.lancome.com.cn/resources/2020/8/12/15971691956235374_258X258.jpg"
          },
          {
            child_id: 5,
            url:"/pages/details2/details2",
            name: '极光水',
            image: "https://res.lancome.com.cn/resources/2020/8/12/15972038769738682_920X920.jpg?version=20200821173443363"
          },
          
          {
            child_id: 4,
            url:"/pages/details3/details3",
            name: '发光眼霜',
            image: "https://res.lancome.com.cn/resources/2020/8/11/15971578410696629_920X920.jpg?version=20200821173443363"
          },
          {
            child_id: 3,
            url:"/pages/details/details",
            name: '大眼精华',
            image: "https://res.lancome.com.cn/resources/2020/8/12/15971696958263712_258X258.jpg"
          },
        ]
      },
      {
        cate_id: 2,
        cate_name: "粉底",
        ishaveChild: true,
     
        children: [{
            child_id: 1,
            url:"/pages/details5/details5",
            name: '持妆粉底液',
            image: "https://res.lancome.com.cn/resources/2020/8/11/15971575644229993_920X920.jpg?version=20200821173443363"
          },
          {
            child_id: 2,
            url:"/pages/details4/details4",
            name: '菁纯气垫',
            image: "https://res.lancome.com.cn/resources/2020/8/11/15971575210112968_920X920.jpg?version=20200821173443363"
          },
          {
            child_id: 3,
            url:"/pages/details/details",
            name: '新菁纯精华粉底液',
            image: "https://res.lancome.com.cn/resources/2020/8/13/15973248493742538_920X920.jpg?version=20200821173443363"
          },
         
          {
            child_id: 4,
            url:"/pages/details/details",
            name: '奇迹薄纱光彩粉底液',
            image: "https://res.lancome.com.cn/resources/2020/8/11/15971574915725901_920X920.jpg?version=20200821173443363"
          },
        ]
      },
      {
        cate_id: 3,
        cate_name: "口红",
        ishaveChild: true,
        
        
        children: [{
            child_id: 1,
            url:"/pages/details/details",
            name: '菁纯柔雾哑光唇膏',
            image: "https://res.lancome.com.cn/resources/2020/8/24/15982685393106298_900X900.png?version=20200821173443363"
          },
          {
            child_id: 2,
            url:"/pages/details/details",
            name: '菁纯漆光水唇釉',
            image: "https://res.lancome.com.cn/resources/2020/8/25/15983518718971143_920X920.jpg?version=20200821173443363"
          },
          {
            child_id: 3,
            url:"/pages/details/details",
            name: '菁纯宝石唇膏',
            image: "https://res.lancome.com.cn/resources/2020/8/11/15971594413883626_920X920.jpg?version=20200821173443363"
          },
          {
            child_id: 4,
            url:"/pages/details/details",
            name: '菁纯小姐唇膏',
            image: "https://res.lancome.com.cn/resources/2020/8/25/15983524139613767_920X920.jpg?version=20200821173443363"
          },
        ]
      },
      {
        cate_id: 4,
        cate_name: "香氛",
        ishaveChild: true,
        children: [{
           
            child_id: 1,
            url:"/pages/details/details",
            name: '真我香水',
            image: "/images/xf.jpg"
            
          },
          {
            child_id: 2,
            url:"/pages/details/details",
            name: '奇迹香水',
            image: "https://res.lancome.com.cn/resources/2020/8/25/15983518016947054_920X920.jpg?version=20200821173443363"
          },
          {
            child_id: 3,
            url:"/pages/details/details",
            name: '美丽人生香水',
            image: "https://res.lancome.com.cn/resources/2020/8/25/15983517017357621_920X920.jpg?version=20200821173443363"
          
          },
        
        ]
      },
  ],
    currentIndex: 0 //0 1 2 3
  },
  switchBtn(e) {
    var that = this;
    that.setData({
      currentIndex: e.currentTarget.dataset.index //
    })
  },

})